package com.stone.inventory.core.app.algorithm;

import com.stone.inventory.core.domain.entity.InvTransaction;
import com.stone.inventory.sharding.config.properties.DbShardingProperty;
import com.stone.inventory.sharding.helper.ShardingHelper;
import com.stone.inventory.sharding.infra.algorithm.AbstractShardingByPosCodeAlgorithm;

/**
 * 事务数据按照服务点分片
 *
 * @author Mr_wenpan@163.com 2021/8/17 11:25 下午
 */
public class TransactionShardingByPosCodeAlgorithm extends AbstractShardingByPosCodeAlgorithm {

    public TransactionShardingByPosCodeAlgorithm(DbShardingProperty dbShardingProperty) {
        super(dbShardingProperty);
    }

    @Override
    public String logicTableName() {
        return ShardingHelper.getEntityLogicTable(InvTransaction.class);
    }
}